import request from '@/utils/request'

export default {
    //条件查询带分页
    getListPage(page,size,params){
        return request({
            url: `/cmsservice/exam-scores/pageExamScores/${page}/${size}`,
            method: 'post', 
            params
          })
    },
    //根据id删除成绩
    removeById(id) {
        return request({
        url: `/cmsservice/exam-scores/removeExamScores/${id}`,
        method: 'post'
         })
    },
    //添加成绩
    addInfo(data){
        return request({
            url: `/cmsservice/exam-scores/addExamScores`,
            method: 'post',
            data
        })
    },
    //修改成绩
    updateInfo(data){
        return request({
            url: `/cmsservice/exam-scores/updateExamScores`,
            method: 'post',
            data          
        }) 
    },
    //id查询数据回显
    getInfoById(id){
        return request({
            url: `/cmsservice/exam-scores/getExamScores/${id}`,
            method: 'get'          
        })
    },
    // 学生端成绩查询
    getExamScores(params) {
        return request({
            url: `/cmsservice/exam-scores/getExamScores`,
            method: 'get',
            params          
        })
    },
    // 成绩统计
    scoreStatistics() {
        return request({
            url: `/cmsservice/exam-scores/scoreStatistics`,
            method: 'get'        
        })
    },
    // 成绩导出 GET /cmsservice/exam-scores/exportScores
    exportScore(params) {
        return request({
            url: `/cmsservice/exam-scores/exportScores`,
            method: 'get',
            params,
            responseType: 'blob'  // 设置响应数据类型为二进制流    
        })
    }
}